<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="text" v-model='msg'><br>
        <span>周长：</span>
        <span>{{zc}}</span><br>
        <span>面积：</span>
        <span>{{mj}}</span>
        
    </div>
    <script src="./js/vue.js"></script>
    <script>
        const ve = new Vue({
            el:'#app',
            data:{
                msg:0,
            },
            computed:{
                zc(){
                    return 2*Math.PI*this.msg
                },
                mj(){
                    return Math.PI*this.msg*this.msg
                }
            }
        })
    </script>
</body>
</html>